<?php
App::uses('AppModel', 'Model');
/**
 * QuantiteArticle Model
 *
 * @property reponse $reponse
 * @property AjoutLigne $AjoutLigne
 */
class QuantiteArticle extends AppModel {
	
	function ajouter($id_ajoutligne, $id_question, $coefficient) {
		$this->Query("INSERT INTO quantite_articles (id_ajout_ligne, id_question, coefficient_ligne) VALUES (".$id_ajoutligne.", ".$id_question.", ".$coefficient.")");
	}
	
/**
 * Primary key field
 *
 * @var string
 */
	public $primaryKey = 'id_ajout_ligne';

	//The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * hasOne associations
 *
 * @var array
 */
	public $hasOne = array(
		'question' => array(
			'className' => 'question',
			'foreignKey' => 'id_question',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'AjoutLigne' => array(
			'className' => 'AjoutLigne',
			'foreignKey' => 'id_ajout_ligne',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);
}
